<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page isELIgnored="false"%>
<%@ include file="../common/taglibs.jsp"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>

<title>POS收单运营管理平台</title>

<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
<link href="<s:url value="/css/a.css"/>" type="text/css"
	rel="stylesheet" />
<link href="<s:url value="/css/index.css"/>" type="text/css"

	rel="stylesheet" />
	
<script type="text/javascript"
	src="<c:url value="/js/jquery-1.3.2.js" />"></script>
<script type="text/javascript" src="<c:url value="/js/common.js" />"></script>
<script language="javascript" type="text/javascript"
	src="<c:url value="/js/My97DatePicker/WdatePicker.js"/>"></script>

<style>
　　　
a {
	text-decoration: none
}

a:hover {
	color: red;
	text-decoration: none
}

a:VISITED {
	color: red;
	text-decoration: none
}
　　


　　　
</style>

<script type="text/javascript">
<!--
	$(document).ready(
			function() {
				
				
			});

	-->
</script>



</head>

<body>

	<div class="subpage">
		<s:form id="queryUserForm" namespace="/manage" action="search.action" method="post"
			theme="simple">
			<div class="user_title">
				<h2 class="headline-inquires">
					POS收单运营管理平台<br />
					<span class="sub-title"></span>
				</h2>
			</div>
			<table width="100%" cellpadding="0" cellspacing="0" border="0"
				class="query_table">

				<tr>
					<td colspan="4" align="center">
						<h2 class="headline-inquires">
							代理商基本信息管理<br />
							<span class="sub-title"></span>
						</h2>

					</td>
				</tr>


				<tr>
					<td colspan="4">&nbsp;</td>
				</tr>

			   <tr>
                <td align="right" width="15%">所属机构：</td>
						<td>
							<s:if test="#session.session_merchant.merType==\"00\"">
							<s:select cssClass="queryWidth" name="searchCondition.orgCode"
								id="orgCode"
								list="#request.orgList" listKey="org_code" listValue="org_name" headerKey="99"
							headerValue="--请选择--" /></s:if>
							<s:else>
							<s:select cssClass="queryWidth" name="searchCondition.orgCode"
								id="orgCode"
								list="#request.orgList" listKey="org_code" listValue="org_name" />
							</s:else>
						</td>
						<td align="right" width="15%">代理商级别：</td>
						<td></td>
                </tr>

				<tr>
					<td align="right">账号：</td>
					<td align="left" colspan="1"><s:textfield id="userNo"
							name="searchCondition.accountNo" cssClass="queryWidth" /></td>
					<td align="right">手机号：</td>
					<td align="left" colspan="1"><s:textfield id="userNames"
							name="searchCondition.mobile" cssClass="queryWidth" /></td>
				</tr>
				<tr>
					<td align="right">商户姓名：</td>
					<td align="left" colspan="1"><s:textfield id="userNo"
							name="searchCondition.realName" cssClass="queryWidth" /></td>
					<td align="right">证件号：</td>
					<td align="left" colspan="1"><s:textfield id="userNames"
							name="searchCondition.cardNo" cssClass="queryWidth" /></td>
				</tr>
				
				<tr>
					
					<td align="right" >商户类型：</td>
						<td  abbr="left">
						   <s:select cssClass="queryWidth" name="searchCondition.merType"
								id="merType"
								list="#{'01':'代理商','02':'推荐人'}" headerKey="99" headerValue="--请选择--" /> 
								
						</td><td align="right" colspan="2">&nbsp;</td>						
				</tr>
				
				<tr>
					<td colspan="4">&nbsp;</td>
				</tr>
				<tr>
						<td colspan="4" align="center"><span style="font-color: red"><s:actionerror /></span>
							<span style="font-color: red;"><s:actionmessage /></span > <span style="font-color: red;"><s:fielderror
									cssClass="fieldError" /></span>
							<span id="otherError"></span>
						</td>
					</tr>
				<tr>
					<td colspan="4" align="right"><s:submit value="查   询" />
						&nbsp;&nbsp;&nbsp;&nbsp; <s:reset value="取  消" />&nbsp;&nbsp;&nbsp;&nbsp; </td>
				</tr>
				<tr>
					<td colspan="4" align="right">
					
					     <s:submit id="qrtBtn" disabled="true"
							value="查  询" /> &nbsp;&nbsp;&nbsp;&nbsp;
						 <s:submit id="resetBtn" disabled="true"
							value="取  消" /> &nbsp;&nbsp;&nbsp;&nbsp;
					
					</td>
				</tr>
				

				<tr>
					<td colspan="4">&nbsp;</td>
				</tr>
			</table>
			<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
					<td colspan="4" align="center">
						<h2 class="headline-inquires">商户基本信息列表</h2>

					</td>
				</tr>
				<s:if
					test="#request.searchRsList != null && #request.searchRsList.size>0">
					<tr>
						<td align="left">&nbsp;&nbsp;&nbsp;&nbsp; <page:pageCount
								max_pages="11" totalPage="${requestScope.totalPage}"
								currentPage="${requestScope.currentPage}"
								action="${rootPath}/mers/search.action?currentPage=" />

						</td>
					</tr>
				</s:if>
			</table>
			<table id="tableList" width="120%" class="table">
				<thead>
					<tr>
						<th>选择</th>
						<th>商户号</th>
						<th>商户名</th>
						<th>商户类型</th>
						
						<th>状态</th>
						<th>所属机构</th>
						<th>所属代理</th>
						<th>法人姓名</th>
						<th>法人手机号</th>
						<th>证件号</th>
						<th>性别</th>
						<th>录入日期</th>
						<th>操作</th>
					</tr>
				</thead>
				<tbody>
					<s:iterator value="#request.searchRsList" status="stat" id="element">
							<tr class="<s:if test="#stat.index%2==0">tr_0</s:if>" >
							<td align="center">
								<s:if test="#element.status==\"01\"||#element.merType==\"00\"">
								  <s:checkboxlist disabled="true" name="multi_sel" list="#{#element.id:''}"  theme="simple" />
					     
								</s:if>
								
								<s:else>
								   
					        	      <s:checkboxlist name="multi_sel" list="#{#element.id:''}"  theme="simple" />
					        	   
					        	  
								</s:else>
						       </td>
							<td>  
							
							<s:if test="#element.merType==\"02\"">
							
							<s:a  href="recomanderQuery.action?merchant.id=%{#element.id}"> <s:property value="#element.accountNo"/></s:a>
							
							</s:if>
							<s:else>
							
							<s:a  href="profitQuery.action?merchant.id=%{#element.id}"> <s:property value="#element.accountNo"/></s:a>
							</s:else>
							 </td>
							<td> [
							<s:if test="#element.status==\"00\"">
							<s:a  href="toModifyMerchantInfo.action?merchant.accountNo=%{#element.accountNo}"> <s:property value="#element.realName"/></s:a>
							</s:if>
							<s:else>
							<s:property value="#element.realName"/>
							</s:else>
							 ]</td>
					        <td>  
					        <s:if test="#element.merType==\"00\"">
					                               管理员
					        </s:if>
					        <s:elseif test="#element.merType==\"02\"">
					                              推荐人
					        </s:elseif>
					        <s:else>
					                               代理商
					        </s:else>
					        
					         </td>
					
					<td> <s:property value="#element.merLevelDesc"/> </td>		
					<td>
							 <s:if test="#element.status==\"00\"">
							正常
							</s:if>
							<s:else>
							   已注销
							</s:else>
							</td>
							<td>
							
							 
							
							<s:property value="#element.superMerchant.accountNo"/>
							
							[<font
							color="red"><s:property value="#element.superMerchant.realName"/>
							</font>
							] 
								
							</td>
						
							<td>
							 <s:property value="#element.mobile"/> </td>
							<td>
							
							 <s:if test="#element.cardType==\"01\"">
							   身份证
							</s:if>
							<s:elseif test="#element.cardType==\"02\"">护照</s:elseif>
							<s:elseif test="#element.cardType==\"03\"">军官证</s:elseif>
							<s:elseif test="#element.cardType==\"04\"">
							驾照
							</s:elseif>
							<s:else>
							其他证件
							</s:else>
							 </td>
					
							
							<td> <s:property value="#element.cardNo"/> </td>
							
							<td> <s:if test="#element.sex==\"0\"">女
							</s:if>
							<s:else>
							男
							</s:else>
							 </td>
							
							
							
							<td> <s:property value="#element.dtCreate"/> </td>
							<td>
							<s:if test="#session.session_merchant.merType==\"00\"">
							 <s:if test="#element.status==\"00\"&&#element.merType!=\"00\"">
								<s:a  href="cancelMerchant.action?merchant.accountNo=%{#element.accountNo}"> 注销</s:a>
							</s:if>
							<s:elseif test="#element.status==\"01\"&&#element.merType!=\"00\"">
								<s:a  href="recoverMerchant.action?merchant.accountNo=%{#element.accountNo}"> 恢复</s:a>
							</s:elseif>
							<s:else>
							   	无操作
							</s:else>
							</s:if>
							<s:else>
							   无操作
							</s:else>
							</td>
				
						    </tr>
						</s:iterator>
				</tbody>
			</table>
		</s:form>
	</div>
	
</body>
</html>
